package com.tomecode.rvr.generator;

/**
 * 
 * Report type
 * 
 * @author Frastia Tomas
 * 
 */
public enum ReportFormate {

	/**
	 * basic txt formate
	 */
	TXT("\t"),
	/**
	 * cvs report formate
	 */
	CVS(";");

	private final String split;

	private ReportFormate(String split) {
		this.split = split;
	}

	public final String getSplit() {
		return split;
	}

	/**
	 * parse report formate
	 * 
	 * @param reportType
	 * @return
	 */
	public final static ReportFormate find(String reportType) {

		for (ReportFormate type : values()) {
			if (type.toString().equalsIgnoreCase(reportType)) {
				return type;
			}
		}
		throw new IllegalArgumentException("report type '" + reportType + "' not suported!");
	}
}
